//
// Created by bxw57 on 2024/6/11.
//

#ifndef CPPPRACTICE_SQLIST_H
#define CPPPRACTICE_SQLIST_H
class SqList{
public:
    int cap;
    SqList(int size):cap(size), top(0) {arr = new int[size];}
    SqList(const SqList &list);
    void push(int val);
    int pop();
    int pop(int index);
    SqList operator+(SqList& list);
    void show();
    ~SqList(){cap = 0; top = 0; delete[] arr;}
private:
    int top;
    int* arr;
};
#endif //CPPPRACTICE_SQLIST_H
